package com.es.util;

import lombok.Data;

import java.util.HashMap;
import java.util.Map;

/**
 * @ClassName Result
 * @author: maliang
 * @Description TODO
 * @date 2021/11/26 17:41
 * @Version 1.0版本
 */
@Data
public class Result {
    private int code;
    private String msg;
    private Object data;

    public static Result success() {
        Result result = new Result();
        result.setCode(200);
        result.setMsg("success");
        return result;
    }

    public static Result success(Object obj) {
        Result result = new Result();
        result.setCode(200);
        result.setMsg("success");
        result.setData(obj);
        return result;
    }

}
